package com.tdkj.service.enterprisezone.impl;

import javax.annotation.Resource;
import javax.persistence.Column;

import org.springframework.stereotype.Component;

import com.tdkj.dao.enterprisezone.IBeanEnterpriseDao;
import com.tdkj.dao.exchangerate.IBeanExchangeRateDao;
import com.tdkj.dao.yellowpage.impl.BeanEnterpriceDaoImpl;
import com.tdkj.model.enterprisezone.BeanEnterprise;
import com.tdkj.model.exchangerate.BeanExchangeRate;
import com.tdkj.service.BaseService;
import com.tdkj.service.enterprisezone.IBeanEnterpriseService;
import com.tdkj.service.exchangerate.IBeanExchangeRateService;
            
@Component("enterpriseService")
public class BeanEnterpriseServiceImpl extends BaseService implements IBeanEnterpriseService{
	
	private IBeanEnterpriseDao beanEnterpriseDao ;

	@Override
	public void updateIntroduce(long enterpriseId, String introduce){
		BeanEnterprise bean = beanEnterpriseDao.findById(enterpriseId , BeanEnterprise.class ); 
		bean.setIntroduce(introduce);
	}
	
	@Override
	public void updateIntroduceImg(long enterpriseId, String introduceImg){
		BeanEnterprise bean = beanEnterpriseDao.findById(enterpriseId , BeanEnterprise.class ); 
		bean.setIntroduceImg(introduceImg);
	}
	
	@Override
	public void updateNotice(long enterpriseId, String notice){
		BeanEnterprise bean = beanEnterpriseDao.findById(enterpriseId , BeanEnterprise.class ); 
		bean.setNotice(notice);		
	}	
	
	@Override	
	public void updateContactWay(long enterpriseId, String enterpriseName , String address , 
			String contactPeople , String qq ,String email , String phone , String fax  ,
			String zipCode ,String siteUrl ,String briefIntroduce ){
		BeanEnterprise bean = beanEnterpriseDao.findById(enterpriseId , BeanEnterprise.class ); 
		bean.setName(enterpriseName);
		bean.setAddress(address);
		bean.setContactPeople(contactPeople);
		bean.setQq(qq);
		bean.setEmail(email);
		bean.setPhone(phone);
		bean.setFax(fax);
		bean.setZipCode(zipCode);
		bean.setSiteUrl(siteUrl);
		bean.setBriefIntroduce(briefIntroduce);
	}		
	
	@Resource
	public void setEnterpriseDao(IBeanEnterpriseDao enterpriseDao) {
		this.beanEnterpriseDao = enterpriseDao;
	}
}
